Question: Is there a dxl command (or something) that allows information to be brought across a link and displayed in a dxl Attribute, WITHOUT having the dxl attribute open the source module for the data. We are using this to display trace information. Example, We have requirements that are linked to testing. In the requirement module, I want to show the name of the test (module name) and the Verification Status (enumerated attribute in the Test module) that is related (linked) to the requirement. Currently our dxl attribute opens the module in read only in the background. Due to a large number of test modules the updates become very slow. It would be really cool if we didn't need to open the modules which are the source for the data every time we wanted to update the trace matrix.
|
Re: DXL Attribute Update by links You can not get attribute values from a linked module without opening the modules. Maybe you would like to think about your use case - what you want to do? If you want a report on the traceability, does it need to be online, realtime? Or would some reporting run would be "good enough"? |
Re: DXL Attribute Update by links
Sadly, I've never actually done it yet, but you CAN get module-level information from modules without opening them up. You cannot get object-level information without opening it up, however. In this case, you want the status of the linked test object, and will have to open up that module to get the information. Test1_3 InReview Test1_4 Passed Test1_55 Failed
for obj in entire requirement module do
{ If this isn't a requirement object then continue
Open up all modules sourcing links to this requirement object
follow the test link to the test object
set obj."MyTestStatus" = test status of test object
}
save requirement module
|
Re: DXL Attribute Update by links
You could somewhat accomplish this with crafty programming. Write your DXL attribute code to only update the value of the DXL attribute if the source module for the data is already open. DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes, you are merely using programming to update its value instead of manual entry.
if(open(module("full path to your module"))) {
Module m = module(item("full path to your module"));
// do your updating
}
|
Re: DXL Attribute Update by links dpechacek - Mon Apr 06 08:30:59 EDT 2009
You could somewhat accomplish this with crafty programming. Write your DXL attribute code to only update the value of the DXL attribute if the source module for the data is already open. DXL Attributes(unlike DXL Columns) do not lose their values. It is stored just like any other attributes, you are merely using programming to update its value instead of manual entry.
if(open(module("full path to your module"))) {
Module m = module(item("full path to your module"));
// do your updating
}
The values of Attr DXL are not stored in the module, they are calculated the first time the value is needed (i.e. displayed), and can be updated on demand (and in some other cases). When the module is closed, the current values are not stored. In your case, since the code only sets obj.attrDXLName when the other module is open (specifically, does NOT erase the results when its closed), you still get nothing displayed when the module is closed, even if you DID get info when it was open. So your code won't update the value when the other module is open and retain the old value when its not, figuring to get something displayed even if its stale. >Louie |
Re: DXL Attribute Update by links llandale - Mon Apr 06 15:33:30 EDT 2009 AAI Services, Textron dpechacek@sc-aaicorp.com David.Pechacek@gmail.com |
Re: DXL Attribute Update by links |
Re: DXL Attribute Update by links Also, you could write a "Batch Update" DXL Script that is run on a regular basis which could read the data from the test modules and update a set of "status" attributes in the Requirements module. This will eliminate the need to open the test modules when users open the Requirements module. Good luck |
Re: DXL Attribute Update by links
Hi,
for l in (current Object) -> "*" do {
o = target l //returns the target object
s = o."Object Text" //returns target object text
}
|